package C615;

/**
 * @program: javase
 * @description:
 * @author: luolidong
 * @create: 2021-06-15 19:21
 * @version: 1.0
 */
/**父类*/
class Base{
    private String showMe()
//    public String showMe()
    {
        return "Base";
    }
    public void print(){
        System.out.println(this.showMe());
    }
}
/**子类*/
class Sub extends Base{
    public  String showMe(){
        System.out.println("Sub");
        return "Sub";
    }
}

/*测试继承*/
public class Test
{public static void main(String[] args){
//    Base base = new Sub();
    Sub base = new Sub();
    base.showMe();
    base.print();
}
}
